<?php
	// Author: Andy Marti
	// Datum: 19.03.2014
	// ----------------------------------------------------
	// Beschreibung Script:
	//   Das Script erzeugt alle Haupt-Klassen und verknüft sie mit einander. 
	// ----------------------------------------------------
	// Änderungen:
	//
	// ----------------------------------------------------
	
	require_once 'config.php';
	require_once 'user_db.php';
	require_once 'member.php';
	require_once 'messages.php';
	require_once 'constants.php';
	require_once 'settings.php';
	require_once 'header.php';
	
	// Create all main classes.
	$Header = new Header();
	$Messages = new Messages();
	$Constants = new Constants();
	$Settings = new Setting();
	$UserDb = new UserDb("mysql:host=localhost;port=".DBPORT.";dbname=".DBNAME, DBUSER, DBUSERPW, array(PDO::ATTR_PERSISTENT=>true));
	$Member = new Member();
	
	// Init all classes.
	$UserDB->Messages = $Messages;
	$Settings->UserDb = $UserDb;
	$Settings->Messages = $Messages;
	$Member->Constants = $Constants;
	$Member->Settings = $Settings;
	$Member->UserDb = $UserDb;
	$Member->Messages = $Messages;

	// Init User.
	$Member->initUser();
?>
